str(fit1_summ)
## List of 11
## $ call : language lm(formula = Y ~ X1, data = sim1)
## $ terms :Classes 'terms', 'formula' language Y ~ X1
## .. ..- attr(*, "variables")= language list(Y, X1)
## .. ..- attr(*, "factors")= int [1:2, 1] 0 1
## .. .. ..- attr(*, "dimnames")=List of 2
## .. .. .. ..$ : chr [1:2] "Y" "X1"
## .. .. .. ..$ : chr "X1"
## .. ..- attr(*, "term.labels")= chr "X1"
## .. ..- attr(*, "order")= int 1
## .. ..- attr(*, "intercept")= int 1
## .. ..- attr(*, "response")= int 1
## .. ..- attr(*, ".Environment")=<environment: R_GlobalEnv>
## .. ..- attr(*, "predvars")= language list(Y, X1)
## .. ..- attr(*, "dataClasses")= Named chr [1:2] "numeric" "numeric"
## .. .. ..- attr(*, "names")= chr [1:2] "Y" "X1"
## $ residuals : Named num [1:250] 0.27 -1.51 -3.264 -1.52 0.038 ...
## ..- attr(*, "names")= chr [1:250] "1" "2" "3" "4" ...
## $ coefficients : num [1:2, 1:4] 2.8101 2.0702 0.2565 0.0451 10.9547 ...
## ..- attr(*, "dimnames")=List of 2
## .. ..$ : chr [1:2] "(Intercept)" "X1"
## .. ..$ : chr [1:4] "Estimate" "Std. Error" "t value" "Pr(>|t|)"
## $ aliased : Named logi [1:2] FALSE FALSE
## ..- attr(*, "names")= chr [1:2] "(Intercept)" "X1"
## $ sigma : num 2.01
## $ df : int [1:3] 2 248 2
## $ r.squared : num 0.895
## $ adj.r.squared: num 0.894
## $ fstatistic : Named num [1:3] 2111 1 248
## ..- attr(*, "names")= chr [1:3] "value" "numdf" "dendf"
## $ cov.unscaled : num [1:2, 1:2] 0.016266 -0.002481 -0.002481 0.000502
## ..- attr(*, "dimnames")=List of 2
## .. ..$ : chr [1:2] "(Intercept)" "X1"
## .. ..$ : chr [1:2] "(Intercept)" "X1"
## - attr(*, "class")= chr "summary.lm"
sigmaHat <- fit1_summ$sigma
sigmaHat
## [1] 2.011301